package com.bflow.api.bo.example;

import com.bflow.api.bo.ext.BflowUserBo;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 功能：ExampleLeave 示例请假流程定义-BO(business object)业务对象
 * 作者：liaofeng
 * 日期：2018-12-19
 */
public class ExampleLeaveBo implements Serializable {

    private static final long serialVersionUID = -622229976534939493L;

    /**
     * 请假类型: 事假=1; 病假=2; 休假=3;
     */
    private Integer type;

    /**
     * 开始时间
     */
    private Date beginTime;

    /**
     * 结束时间
     */
    private Date endTime;

    /**
     * 请假天数
     */
    private BigDecimal leaveDay;

    /**
     * 请假事由
     */
    private String reason;

    /**
     * 审批人集合
     */
    private String auditUserIds;

    /**
     * 发起人ID
     */
    private String applyUid;

    /**
     * 发起人姓名
     */
    private String applyUname;

    /**
     * 版本号
     */
    private Integer version;

    /**
     * 抄送人集合
     */
    private String copyToUserIds;

    public ExampleLeaveBo() {
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Date getBeginTime() {
        return beginTime;
    }

    public void setBeginTime(Date beginTime) {
        this.beginTime = beginTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public BigDecimal getLeaveDay() {
        return leaveDay;
    }

    public void setLeaveDay(BigDecimal leaveDay) {
        this.leaveDay = leaveDay;
    }

    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }

    public String getAuditUserIds() {
        return this.auditUserIds;
    }
    public void setAuditUserIds(String auditUserIds) {
        this.auditUserIds = auditUserIds;
    }

    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }

    public String getApplyUid() {
        return this.applyUid;
    }
    public void setApplyUid(String applyUid) {
        this.applyUid = applyUid;
    }

    public String getApplyUname() {
        return this.applyUname;
    }
    public void setApplyUname(String applyUname) {
        this.applyUname = applyUname;
    }

    public void setApplyInfo(BflowUserBo userBo){
        if (userBo != null){
            setApplyUid(userBo.getUserId());
            setApplyUname(userBo.getUserName());
        }
    }

    public String getCopyToUserIds() {
        return copyToUserIds;
    }

    public void setCopyToUserIds(String copyToUserIds) {
        this.copyToUserIds = copyToUserIds;
    }
}

